# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: knuxify <knuxify@gmail.com>
pkgname=gtk-frdp
pkgver=3.37.1_git20240313
# only gnome-connections uses this, and they depend on this revision
_commit=97e166b7f2970ea5b723352fabac732cd6a0f41c
pkgrel=0
pkgdesc="RDP viewer widget for GTK"
url="https://gitlab.gnome.org/GNOME/gtk-frdp"
arch="all"
license="GPL-3.0-or-later AND LGPL-3.0-or-later"
makedepends="
	freerdp-dev
	fuse3-dev
	glib-dev
	gobject-introspection-dev
	gtk+3.0-dev
	meson
	vala
	"
depends_dev="gtk-frdp gtk+3.0-dev"
subpackages="$pkgname-dev $pkgname-viewer:_viewer"
source="https://gitlab.gnome.org/GNOME/gtk-frdp/-/archive/$_commit/gtk-frdp-$_commit.tar.gz"
builddir="$srcdir/gtk-frdp-$_commit"
options="!check" # no test suite

build() {
	abuild-meson \
		-Db_lto=true \
		-Dexamples=true \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

_viewer() {
	pkgdesc="Demo app for gtk-frdp"
	amove usr/bin/gtk-frdp-viewer
}

sha512sums="
fc00ab9e7cb924689a434c775f535c258399d863f4f3c229bd68fde03e40e0e1c4813cce8d82d3ad38a3b57525d67f472b4edc8f9077f951ad6f31e50ab891be  gtk-frdp-97e166b7f2970ea5b723352fabac732cd6a0f41c.tar.gz
"
